from django.contrib import admin
from django.utils.translation import ugettext_lazy as _
from models import Video

class VideoAdmin(admin.ModelAdmin):
	fieldsets = (
	    (None, {'fields': ('site', 'user', 'video', 'title', 'slug',
			'summary',)}),
	    (_(u'Tagging'), {'fields': ('tags',),}),
	    (_(u'Date information'), {'fields': ('pub_date',), 
			'classes': 'collapse'}),
	    (_(u'Settings'), {'fields': ('publication_status',)}),
	)
	list_display = ('title', 'pub_date', 'site', 'user', 'video', 
		'publication_status',)
	list_filter = ('pub_date', 'site', 'user', 'publication_status',)
	search_fields = ['title']
	date_hierarchy = 'pub_date'
	prepopulated_fields = {'slug': ('title',)}
	radio_fields = {'publication_status': True}
	
admin.site.register(Video, VideoAdmin)